Skip to content

test: clean up oauth refresh failure path in oauth2 integration test#45833

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-job-release-test-only
Draft

test: clean up oauth refresh failure path in oauth2 integration test#45833
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-job-release-test-only

Conversation

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The failing Precheck / Release (x64) / ./ci/do_ci.sh release.test_only job was caused by an oauth2 integration test leaving an active downstream request open on an expected failure path. The failure surfaced in OauthUseRefreshTokenDisabled.FailRefreshTokenFlow under IPv6_GoogleGrpc_CbcEncryption.

  • Root cause

    • doRefreshTokenFlow(..., expect_failure = true) returned immediately after confirming the OAuth upstream request failed.
    • The test did not drain the downstream response or close the test connections, so HttpIntegrationTest teardown hit numActiveRequests() == 1.
  • Change

    • Handle the expected-failure branch like the successful branch with explicit response completion and connection cleanup.
    • Assert the downstream response is the expected redirect before returning.
  • Effect

    • The test now fully closes the request lifecycle in the refresh-token-disabled path, avoiding teardown failures in release test runs.
waitForOAuth2Response(token_secret, expect_failure);
if (expect_failure) {
  response->waitForHeaders();
  EXPECT_EQ("302", response->headers().getStatusValue());
  RELEASE_ASSERT(response->waitForEndStream(), "unexpected timeout");
  cleanup();
  return;
}

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #45833 was opened by Copilot.

see: more, trace.

Co-authored-by: yanavlasov <6360027+yanavlasov@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job for release test only test: clean up oauth refresh failure path in oauth2 integration test Jun 25, 2026
Copilot AI requested a review from yanavlasov June 25, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants